/* ==========================================================
   SITE HEADER (header.php)
   Desktop-only restyle (>= 992px); the mobile slide-out menu
   keeps its original styles from menu.css / responsive.css.
   ========================================================== */

#header {
  --hd-navy: #161f45;
  --hd-navy-2: #253993;
  --hd-rose: #ff1f59;
  --hd-ink: #283034;
}

/* top bar is hidden on mobile, where the fixed mobile header takes over */
.hd-topbar {
  display: none;
}

@media only screen and (min-width: 992px) {

  /* ---------- Top contact bar ---------- */
  .hd-topbar {
    display: block;
    background: var(--hd-navy);
  }

  .hd-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    height: 42px;
  }

  .hd-topbar-contact,
  .hd-topbar-links {
    display: flex;
    align-items: center;
    gap: 26px;
  }

  .hd-topbar a {
    font-size: .85rem;
    color: rgba(255, 255, 255, .72);
    transition: color .2s;
  }

  .hd-topbar a:hover {
    color: #fff;
  }

  .hd-topbar-contact i {
    margin-right: 6px;
    color: var(--hd-rose);
  }

  .hd-topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(90deg, var(--hd-navy-2), var(--hd-rose));
  }

  .hd-topbar-cta i {
    font-size: .75rem;
    transition: transform .25s;
  }

  .hd-topbar-cta:hover i {
    transform: translateX(3px);
  }

  /* ---------- Logo row ---------- */
  #header .wsmainfull {
    box-shadow: none;
    background:
      radial-gradient(circle at 100% 0, rgba(255, 31, 89, .06) 0, rgba(255, 31, 89, 0) 35%),
      radial-gradient(circle at 0 100%, rgba(37, 57, 147, .06) 0, rgba(37, 57, 147, 0) 35%),
      #fff !important;
  }

  #header .hd-brand {
    align-items: center;
  }

  #header .hd-brand .desktoplogo {
    margin-bottom: 0 !important;
    padding: 18px 0 24px !important;
    line-height: normal;
  }

  #header .hd-brand .logo-img {
    transition: transform .3s;
  }

  #header .hd-brand a:hover .logo-img {
    transform: scale(1.03);
  }

  /* ---------- Menu bar ---------- */
  #header .wsmenu {
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  /* flat band stretched to the full window width behind the menu */
  #header .wsmenu::after {
    content: "";
    display: block;   /* menu.css sets display: table here, which collapses the height */
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: linear-gradient(100deg, var(--hd-navy) 0%, var(--hd-navy-2) 70%, #4a2f8f 100%);
  }

  #header .wsmenu > .wsmenu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #header .wsmenu > .wsmenu-list > li {
    float: none;
  }

  #header .wsmenu > .wsmenu-list > li > a {
    position: relative;
    margin: 0;
    padding: 18px 18px;
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: .2px;
    color: rgba(255, 255, 255, .88);
    border: 0;
    border-radius: 0;
    transition: background .25s, color .25s;
  }

  /* dropdown items need room for the caret */
  #header .wsmenu > .wsmenu-list > li > a:has(.wsarrow) {
    padding-right: 30px;
  }

  #header .wsmenu > .wsmenu-list > li > a .wsarrow:after {
    top: 25px;
    right: 14px;
    opacity: .7;
  }

  #header .wsmenu > .wsmenu-list > li:hover > a {
    color: #fff;
    background: rgba(255, 255, 255, .08);
  }

  /* current page (class added by footer.php script) */
  #header .wsmenu > .wsmenu-list > li > a.active-menu-link {
    color: #fff !important;
    font-weight: 700;
    border-bottom: 0;
    background: var(--hd-rose);
    box-shadow: none;
  }

  /* keep the active item rose on hover too */
  #header .wsmenu > .wsmenu-list > li:hover > a.active-menu-link {
    background: var(--hd-rose);
  }

  /* ---------- Dropdowns ---------- */
  #header .wsmenu > .wsmenu-list > li > ul.sub-menu {
    top: 100%;
    min-width: 250px;
    padding: 8px 0;
    border: 0;
    border-top: 3px solid var(--hd-rose);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 24px 44px -20px rgba(22, 31, 69, .45);
  }

  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li {
    border-bottom: 0;
  }

  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a {
    border: 0;
    position: relative;
    padding: 10px 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--hd-ink);
    border-radius: 0;
    transition: background .2s, color .2s, padding .2s;
  }

  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a:hover {
    padding: 10px 14px 10px 22px;
    color: var(--hd-navy-2);
    background: #f4f6fc;
  }

  /* rose dot that appears on hover */
  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--hd-rose);
    opacity: 0;
    transition: opacity .2s;
  }

  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a:hover::before,
  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a.active-menu-link::before {
    opacity: 1;
  }

  #header .wsmenu > .wsmenu-list > li > ul.sub-menu > li > a.active-menu-link {
    padding-left: 22px;
    color: var(--hd-rose) !important;
    font-weight: 700;
    background: #fff0f4;
  }
}

/* narrower desktops: tighten the menu so it stays on one line */
@media only screen and (min-width: 992px) and (max-width: 1199.95px) {
  #header .wsmenu > .wsmenu-list > li > a {
    padding: 18px 12px;
    font-size: 14px;
  }

  #header .wsmenu > .wsmenu-list > li > a:has(.wsarrow) {
    padding-right: 26px;
  }

  #header .wsmenu > .wsmenu-list > li > a .wsarrow:after {
    right: 10px;
  }

  .hd-topbar-contact,
  .hd-topbar-links {
    gap: 16px;
  }
}

/* ---------- Offset content below the fixed header ----------
   --hd-h is the measured header height, set by the script in footer.php.
   Falls back to the original offsets if the script has not run. */
@media only screen and (min-width: 992px) {
  .inner-page-wrapper {
    margin-top: calc(var(--hd-h, 172px) + 23px);
  }

  .slider {
    margin-top: var(--hd-h, 172px);
  }
}
